package me.keiwu.admin.domain.user;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import me.keiwu.admin.domain.AbstractBaseEntity;
import me.keiwu.pub.data.service.UserInfoBean;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;


@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@DynamicUpdate
public class UserLabel extends AbstractBaseEntity{

    @Id
    @GeneratedValue
    private Long id;

    @Column(name = "user_id", length = 50)
    private Long userId;

    @Column(name = "label_id")
    private Long labelId;

    @Transient
    private UserInfoBean user;
    @Transient
    private Label label;
}
